<script setup>
import {ref,onMounted} from 'vue'
//banner图片
const bannerPir=ref([])
//api
import {getBannerAPI} from '@/apis/CategoryApi'
// const getBanner =async () =>{
//   let res =await getBannerAPI()
//   // console.log(res.result)
//   bannerPir.value=res.result
// }

onMounted(()=>{
  // getBanner()
  bannerPir.value=[
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/1.png",
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/2.png",
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/3.png",
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/4.png",
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/5.png",
    "https://fengfeng-web-ai.oss-cn-beijing.aliyuncs.com/lv-project/6.png"
  ]
})
</script>



<template>
  <div class="home-banner">
    <el-carousel height="500px">
      <el-carousel-item v-for="item in bannerPir" :key="item.id">
        <img :src="item" alt="">
      </el-carousel-item>
    </el-carousel>
  </div>
</template>



<style scoped lang='scss'>
.home-banner {
  width: 800px;
  height: 500px;
  top: 0;
  z-index: 98;

  img {
    width: 100%;
    height: 500px;
  }
}
</style>